//
//  M1MoreVipCell.m
//  NewMarryU
//
//  Created by apple on 2018/8/9.
//  Copyright © 2018年 Cedar. All rights reserved.
//

#import "M1MoreVipCell.h"

@implementation M1MoreVipCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = m1_bg_color;
        UILabel *m1_LB = [[UILabel alloc]init];
        m1_LB.font = m1_font(16);
        m1_LB.text = @"加V会员可查看更多";
        [self addSubview:m1_LB];
        [m1_LB mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self);
            make.top.offset(15);
        }];
        
        UIButton *m1_btn = [UIButton buttonWithType:UIButtonTypeCustom];
        [m1_btn setBackgroundImage:[UIImage imageNamed:@"btn_color"] forState:0];
        m1_btn.titleLabel.font = m1_font(15);
        [m1_btn setTitle:@"立即加入" forState:0];
        m1_btn.layer.cornerRadius = 15;
        m1_btn.clipsToBounds = YES;
        [m1_btn setTitleColor:[UIColor whiteColor] forState:0];
        [self addSubview:m1_btn];
        [m1_btn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self);
            make.top.equalTo(m1_LB.mas_bottom).offset(15);
            make.size.mas_offset(CGSizeMake(100, 30));
        }];
        
        UIView *m1_line = [[UIView alloc] init];
        m1_line.backgroundColor = m1_color(0xCCCCCC);
        [self.contentView addSubview:m1_line];
        
        [m1_line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.offset(19);
            make.right.offset(-20);
            make.bottom.offset(0);
            make.height.offset(0.5);
        }];
    }
    return self;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
